package com.luoha.excel;

public class ExcelUtil {

    public static final String OFFICE_EXCEL_2003_POSTFIX = "xls";
    public static final String OFFICE_EXCEL_2010_POSTFIX = "xlsx";

    public static final String EMPTY = "";
    public static final String POINT = ".";
    public static final String RESOURCES_PATH = "resources";
    public static final String EMPLOYEE_INFO_XLS_PATH = RESOURCES_PATH + "/员工名单" + POINT + OFFICE_EXCEL_2003_POSTFIX;
    public static final String EMPLOYEE_INFO_XLSX_PATH = RESOURCES_PATH + "/员工名单" + POINT + OFFICE_EXCEL_2010_POSTFIX;
    public static final String NOT_EXCEL_FILE = " : Not the Excel file!";
    public static final String PROCESSING = "Processing...";
    
    
    public static String getPostfix(String path) {
        if (path == null || EMPTY.equals(path.trim())) {
            return EMPTY;
        }
        if (path.contains(POINT)) {
            return path.substring(path.lastIndexOf(POINT) + 1, path.length());
        }
        return EMPTY;
    }

}
